package com.machine.action.user;

import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.opensymphony.xwork2.ActionSupport;

@Component("logout")
@Scope(value="prototype")
public class Logout extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public String execute() throws Exception {
		ServletActionContext.getContext().getSession().remove("username");
		return SUCCESS;
	}

}
